package com.yociyy.admin.model.entity;

import com.yociyy.common.entity.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 部门信息 entity
 * 
 * @author Y.yang
 * @date 2019-12-02
 */
@Data
@Accessors(chain = true)
@Table(name = "base_dept")
public class BaseDept extends BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/** 用户ID */
	@Id
	@Column(name = "id")
	@GeneratedValue(generator = "JDBC")
	protected Long id;

	/** 父部门id */
	@Column(name = "parent_id")
	private Long parentId;

	/** 祖级列表 */
	@Column(name = "ancestors")
	private String ancestors;

	/** 部门名称 */
	@Column(name = "dept_name")
	private String deptName;

	/** 显示顺序 */
	@Column(name = "sorted")
	private Integer sorted;

	/** 负责人 */
	@Column(name = "leader")
	private String leader;

	/** 联系电话 */
	@Column(name = "phone")
	private String phone;

	/** 部门状态（0:正常 1:停用）*/
	@Column(name = "enabled")
	private String enabled;

}
